package com.aob.service.impl;

import com.aob.pojo.Type;
import com.aob.mapper.TypeMapper;
import com.aob.service.TypeService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Desc: 接口实现类
 * @Author: ChenWenJie
 */
@Service("typeService")
public class TypeServiceImpl implements TypeService {

    @Autowired(required = false)
    private TypeMapper typeMapper;

    public TypeMapper getTypeMapper() {
        return typeMapper;
    }

    public void setTypeMapper(TypeMapper typeMapper) {
        this.typeMapper = typeMapper;
    }

    @Override
    public int add(Type type) {
        return typeMapper.add(type);
    }

    @Override
    public int deleteTypeById(Integer id) {
        return typeMapper.deleteTypeById(id);
    }

    @Override
    public int update(Type type) {
        return typeMapper.update(type);
    }

    @Override
    public int getTypeCount(Map<String, Object> map) {
        return typeMapper.getTypeCount(map);
    }

    @Override
    public Type getTypeById(Integer id) {
        return typeMapper.getTypeById(id);
    }

    @Override
    public List<Type> getTypeListByObj(Type type) {
        return typeMapper.getTypeListByObj(type);
    }

    @Override
    public List<Type> getTypePageByMap(Map<String, Object> map) {
        return typeMapper.getTypePageByMap(map);
    }

    @Override
    public Type getTypeByMap(Map<String, Object> map) {
        return typeMapper.getTypeByMap(map);
    }
}
